<form action="index.php" method=post>
<input name="page" type=hidden value=undefined>
	<div class="navbar navbar-static-top">
		<div class="navbar-inner">
			<div class="container">
				<ul class="nav">
					<li <?php if (ISSET($_POST["page"])) {
								if ($_POST["page"] == "welcome_page") {
									echo "class=\"active\"";}}?>
						><a class="brand" href="#" type="submit"
						onclick="document.forms[0].page.value='welcome_page';document.forms[0].submit();">
							Accueil</a>
					</li>
					<li class="divider-vertical"></li>
					
					<li <?php if (ISSET($_POST["page"])) {
								if ($_POST["page"] == "pizzas_page" || $_POST["page"] == "custom_page") {
									echo "class=\"active\"";}}?>
						><a class="brand" href="#"
						onclick="document.forms[0].page.value='pizzas_page';document.forms[0].submit();">
							Pizzas</a>
					</li>
					<li class="divider-vertical"></li>
					
					<li <?php if (ISSET($_POST["page"])) {
								if ($_POST["page"] == "drinks_page") {
									echo "class=\"active\"";}}?>
						><a class="brand" href="#"
						onclick="document.forms[0].page.value='drinks_page';document.forms[0].submit();">
							Boissons</a>
					</li>
					<li class="divider-vertical"></li>
					
					<li <?php if (ISSET($_POST["page"])) {
								if ($_POST["page"] == "sidings_page") {
									echo "class=\"active\"";}}?>
						><a class="brand" href="#"
						onclick="document.forms[0].page.value='sidings_page';document.forms[0].submit();">
							A côtés</a></li>
					<li class="divider-vertical"></li>
					
					<li <?php if (ISSET($_POST["page"])) {
								if ($_POST["page"] == "login_page") {
									echo "class=\"active\"";}}?>
						>
						
						<?php 
						if(!isset($_SESSION['logged'])){
							echo '<a class="brand" href="#"
						onclick="document.forms[0].page.value=\'login_page\';document.forms[0].submit();">
							Se connecter</a>';
						} else {
							echo '<a class="brand" href="#"
						onclick="document.forms[0].page.value=\'logout_page\';document.forms[0].submit();">
							Se déconnecter</a></li><li class="divider-vertical"></li><li>';
	
							if ($_SESSION['user'] == 'admin')
							{
								echo '<a href="../vue/admin_page.php">Welcome, '.$_SESSION['user'];
								echo '</a>';
							} else {
								echo '<a href="#">Welcome, '.$_SESSION['user'];
								echo '</a>';
							}
						}
						?>
						
						</li>
					<li class="divider-vertical"></li>
				</ul>

			</div>
		</div>
	</div>

</form>
